
function defineInitCreateToolBar(isAdd,isUpdate,isDel,isMove) {
    var a = [];
    if (isAdd) {
        a.push({
            text: '添加',
            iconCls: 'icon-add',
            handler: function () {
                CRUD.Add();
            }
        });
        a.push('-');
    }

    if (isUpdate) {
        a.push({
            text: '编辑',
            iconCls: 'icon-edit',
            handler: function () {
                CRUD.Update();
            }
        });
        a.push('-');
    }

    if (isDel) {
        a.push({
            text: '删除',
            iconCls: 'icon-cut',
            handler: function () {
                CRUD.Del();
            }
        });
        a.push('-');
    }

    if (isMove) {
        a.push({
            text: '转移',
            iconCls: 'icon-remove',
            handler: function () {
                CRUD.Move();
            }
        });
        a.push('-');
    }
    return a;
}

function defineInitInitForm() {
    var width = 550;
    var height = window.screen.height;
    if (height > 500) {
        height = 500;
    }
    $('#dialogAdd').dialog({
        closed: true,
        title: "添加指标分类",
        width: width,
        height: height
    });
}

